<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:a4j="http://richfaces.org/a4j"
                 xmlns:fn="http://java.sun.com/jsp/jstl/functions">

            <h:dataTable id="productsTable" styleClass="display"  var="record" value="#{productsController.products}" rows="0" columnClasses="column1,column2,column3,column4,column5,column6,column7,column8">

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Name" />
                    </f:facet>
                    <h:outputText value="#{record.name}" id="name" />
                </h:column>

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Category" />
                    </f:facet>
                    <h:outputText value="#{record.defaultCategory}" id="category" />
                </h:column>

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Retail Price" />
                    </f:facet>
                    <h:outputText value="#{record.retailPrice}" id="retailPrice" />
                </h:column>


                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Credit Price" />
                    </f:facet>
                    <h:outputText value="#{record.creditPrice}" id="creditPrice" />
                </h:column>


                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Stock Price" />
                    </f:facet>
                    <h:outputText value="#{record.stockPrice}" id="stockPrice" />
                </h:column>


                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Availability" />
                    </f:facet>
                    <h:outputText value="#{record.availability}" id="availability" />
                </h:column>

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Actions" />
                    </f:facet>
                    <a href="#?w=600" rel="popup_name" class="poplight">
                        <h:graphicImage id="modify" name="webappers/Modify.ico" library="images" alt="modify"/>
                    </a>
                </h:column>

            </h:dataTable>
</ui:composition>